home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
cuj0593.zip
/
1105082B
< prev
next >
Wrap
Text File
|
1993-03-16
|
648b
|
36 lines
// fv1.h - a dynamic vector of float (with a possibly
// non-zero low-bound) using a subscripting object
// implemented by inheritance from float_array
#include "fa1.h"
class float_vector : public float_array
{
public:
float_vector(int lo = 0, int hi = 0);
float operator[](int i) const;
fa_index operator[](int i);
int low() const;
int high() const;
private:
int _low;
};
inline float_vector::float_vector(int lo, int hi)
: _low(lo), float_array(hi - lo + 1)
{ }
inline int float_vector::low() const
{
return _low;
}
inline int float_vector::high() const
{
return _low + length() - 1;
}